package com.bwie.system.controller;

import com.bwie.common.domain.Admin;
import com.bwie.common.result.Result;
import com.bwie.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：作者姓名
 * @Package：com.bwie.system.controller
 * @Project：_yk
 * @name：UserController
 * @Date：2024/6/17 10:03
 */
@RestController
@RequestMapping("/User")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/toUser")
    public Result<Admin> Login(@RequestParam String userName){
        Admin admin = userService.FindAll(userName);
        return Result.success(admin);
    }



}
